<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1>Document</h1>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <script>
    // axios.defaults.baseURL = 'http://fpspider.lsj001.com';
    axios.defaults.baseURL = 'http://47.102.37.77:8070';
    // axios.defaults.baseURL = 'http://localhost:8070';
    // axios.defaults.proxy = {
    //   host: 'http://fpspider.lsj001.com',
    //   port: 8070
    // };
    axios.interceptors.response.use(function (response) {
      // 对响应数据做点什么
      return response.data;
    }, function (error) {
      // 对响应错误做点什么
      return Promise.reject(error);
    });
    axios.post("/chexia/htmltopdf", {url: "http://crmcdn.fp114.com/temp/21c01335-ab1e-47d4-8bfc-bd9914ab1055.htm", top: 40, headerTemplate: "<div style='font-size:10px; color:#4a4a4a;text-align:right;width:100%;box-sizing:border-box;padding-right:14px'><span>第</span><span class='pageNumber'></span><span>页/共</span><span class='totalPages'></span><span>页</span></div>"}).then(res => {
      console.log("htmltopdf: ", res);
    })
    // axios.post("/chexia/htmltopdf", { url: "http://www.baidu.com", top: 40, headerTemplate: "<div style='font-size:10px; color:#4a4a4a;text-align:right;width:100%;box-sizing:border-box;padding-right:14px'><span>第</span><span class='pageNumber'></span><span>页/共</span><span class='totalPages'></span><span>页</span></div>" }).then(res => {
    //   console.log("htmltopdf: ", res);
    // })
  </script>
</body>

</html>